<template>
  <!-- 讲师介绍 -->
  <div id="tag2" class="commonWrap teacher">
    <img
      class="teacher-img"
      src="https://img.xiaopiu.com/userImages/img2041179ac49a490.jpg"
    />
    <van-collapse v-model="activeName" accordion :border='false'>
      <div class="block" v-if="data[0]">
       <van-collapse-item :title="data[0].userNickName+'&nbsp(已从业'+data[0].experience+'年）'" name="1">
         {{data[0].userDescription}}
       </van-collapse-item>
      </div>
    </van-collapse>
    <!-- <div class="teacherInfo">
      <span class="teacherInfo-name" v-if="data[0]">讲师：{{ data[0].userDescription }}</span>
      <span class="teacherInfo-experience" v-if="data[0]">>已从业{{ data[0].experience }}年</span>
    </div>
    <van-icon class="info-arrow" name="arrow" size="10" /> -->
  </div>
</template>

<script>
import { reactive, ref } from "vue";
export default {
  props: {
    data: {
      type: Object,
      default() {
        return {};
      },
    },
  },
  setup() {
    let activeName = ref("0");
    return {
      activeName,
    };
  },
};
</script>

<style lang="scss" scoped>
.teacher {
  display: flex;
  position: relative;
  font-size: 12px;

  .teacher-img {
    width: 50px;
    height: 45px;
  }
  .teacherInfo {
    padding-top: 10px;
    padding-bottom: 10px;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    &-name {
      font-weight: 600;
    }
  }
  .info-arrow {
    position: absolute;
    right: 10px;
    font-size: 18px;
    top: 40px;
  }
}
.block {
  width: 250px;
}
</style>
